//
// Created by QU on 2024/4/7.
//
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>

// c++17 filesystem header
#include <filesystem>
// string stream
#include <sstream>

using namespace std;

namespace fs = std::filesystem;

int main() {
    auto filePath = fs::current_path();
    filePath = filePath / "test.txt";
    cout << filePath << endl;

    ofstream oFile1 = ofstream(filePath, ios_base::out | ios_base::app | ios_base::binary);

    if (oFile1.is_open()) {
        cout << "opened" << unitbuf;
#ifdef WIN32
        oFile1 << "This is aquawius speaking.\r\n" << unitbuf;
#else
        oFile1 << "This is aquawius speaking.\n" << unitbuf;
#endif

    } else {
        cerr << "not opened" << endl;
    }


}

//typedef int a;
//typedef int b;
//
//decltype(a + b) hello(int m, int n) -> int {
//    return decltype(a + b) m + n;
//}